<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<jsp:include page="../common/common.jsp" />
    <script language="JavaScript">var _username = '${user.username}';</script>
	<link href="${path}/assets/plugins/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
	<link href="${path}/assets/plugins/ligerUI/skins/Gray/css/all.css" rel="stylesheet" />
</head>
<body class="page-header-fixed page-sidebar-fixed">
	<jsp:include page="../common/header.jsp" />
	<div class="clearfix"></div>
	<div class="page-container">
        <div class="page-sidebar-wrapper">
            <jsp:include page="../common/menu.jsp" />
        </div>
		<div class="page-content-wrapper">
			<div class="page-content">
			   <div class="row" >
			   <div class="col-md-12">
				<div class="col-md-4">
						<div class="portlet green box">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i>配置分类
								</div>
								<div class="tools">
									<a href="javascript:addConf()"><i class="fa fa-plus"></i></a>
								</div>
							</div>
							<div class="portlet-body form">
								<div class="scroller" data-always-visible="1" data-rail-visible="0">
									<div id="typegrid" class="list-group"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="col-md-8">
						<div class="portlet box purple ">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-reorder"></i>配置列表
								</div>
								<div class="tools">
									<div class="actions">
										<button type="button" id="addValue" class="btn green">增加</button>
										<button type="button" id="editValue" class="btn blue">修改</button>
										<button type="button" id="btnDelValue" class="btn red"><i class="fa fa-trash-o"></i></button>
									</div>
								</div>
							</div>
							<div class="portlet-body form">
								 <!-- 列表内容 -->
								 <div id="listgrid"></div>
								 <div id="listgrid2" style="display: none;"></div>
							</div>
						</div>
					</div>
					 <div id="confbaseInfo" class="modal fade bs-modal-lg" tabindex="-1" role="dialog" data-keyboard="false">
						<div class="modal-dialog modal-lg">
						<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
							<h4 class="modal-title">添加配置分类</h4>
						</div>
						<div class="modal-body">
							<form id="confformBase" class="form-horizontal">
										<div class="form-group">
											<label class="col-md-3 control-label">名称：</label>
											<div class="col-md-5">
											    <input type="hidden" id="id" name="id">
												<input type="text" id="confname" name="confname" class="form-control">
											</div>
										</div>
										<div class="form-group" id="word" >
											<label class="col-md-3 control-label">类型：</label>
											<div class="col-md-5">
												<select id="type" name="type" class="form-control">
													<option value="0">树形</option>
													<option value="1">列表</option>
													<option value="2">键值对文字模式</option>
													<option value="3">键值对图文模式</option>
												</select>
											</div>
										</div>
										<div class="form-group" >
                                            <label class="col-md-3 control-label">级别：</label>
                                            <div class="col-md-5">
                                                <select id="level" name="level" class="form-control">
                                                    <c:if test="${user.username == 'superadmin' }">
                                                        <option value="0">系统级</option>
                                                    </c:if>
                                                    <option value="1">业务级</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group" >
                                            <label class="col-md-3 control-label">子项可否删除：</label>
                                            <div class="col-md-5">
                                                <select id="delsubflag" name="delsubflag" class="form-control">
                                                     <option value="0">可以</option>
                                                    <option value="1">不可以</option>
                                                </select>
                                            </div>
                                        </div>
										<div class="form-group">
											<label class="col-md-3 control-label">排序号：</label>
											<div class="col-md-5">
												<input type="text" id="sort" name="sort" class="form-control">
											</div>
										</div>
										<div class="form-group" id="word" >
											<label class="col-md-3 control-label">描述：</label>
											<div class="col-md-5">
												<textarea id="remark" name="remark" class="form-control" maxlength="225" rows="4"></textarea>
											</div>
										</div>
							</form>
						</div>
						<div class="modal-footer">
							<button type="button" class="btn default" data-dismiss="modal">取消</button>
							<button type="button" class="btn blue" onclick="saveConf()">保存</button>
						</div>
					</div>
					</div></div>
					
					<div id="confvaluebaseInfo" class="modal fade bs-modal-lg" tabindex="-1" role="dialog" data-keyboard="false">
									<div class="modal-dialog modal-lg">
										<div class="modal-content">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal"></button>
												<h4 class="modal-title">树状模式-内容编辑</h4>
											</div>
											<div class="modal-body">
											<div class="row">
					<div class="col-md-8">
						<div class="portlet box purple ">
							<div class="portlet-body form">
								<form id="confvalueformBase" class="form-horizontal">
									<div class="form-group">
											<label class="col-md-3 control-label">上级名称<span class="required">*</span></label>
											<div class="col-md-6">
												<input type="hidden" id="id" name="id" >
												<input type="hidden" id="pid" name="pid" value="0">
												<input type="hidden" id="typeid" name="typeid"/>
												<input type="hidden" id="value2" name="value2"/>
												<input type="hidden" id="keywords" name="keywords" >
												<input type="hidden" id="levels" name="levels" >
												<input type="text" id="pvalue" name="pvalue" class="form-control" readonly="readonly">												
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">名称<span class="required">*</span></label>
											<div class="col-md-6">
												<input type="text" id="value0" name="value0" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">排序号</label>
											<div class="col-md-6">
												<input type="text" id="sort" name="sort" class="form-control">
											</div>
										</div>
										<div class="form-group" id="word" >
											<label class="col-md-3 control-label">描述</label>
											<div class="col-md-6">
												<textarea id="remark" name="remark" class="form-control" maxlength="225" rows="1"></textarea>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">扩展1</label>
											<div class="col-md-6">
												<input type="text" id="value3" name="value3" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">扩展2</label>
											<div class="col-md-6">
												<input type="text" id="value4" name="value4" class="form-control">
											</div>
										</div>
										<div class="form-group" id="pic">
											<label class="col-md-3 control-label">图片</label>
											<div class="col-md-8">
												<div class="fileinput fileinput-new" data-provides="fileinput">
													<div class="fileinput-new thumbnail" style="width: 300px; height: 100px;">
														<img  id="showImg" >
													</div>
													<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 100px;">
													</div>
													<div>
														<span class="btn default btn-file">
															<span class="fileinput-new">
																 上传图片
															</span>
															<span class="fileinput-exists">
																 修改
															</span>
															<input type="file" id="file" accept="image/*" name="file" />
														</span>
														<a href="#"  class="btn default fileinput-exists" data-dismiss="fileinput">
															 删除
														</a>
													</div>
												</div>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">链接</label>
											<div class="col-md-6">
												<input type="text" id="value1" name="value1" class="form-control">
											</div>
										</div>
							</form>
							</div>
						</div>
				</div>
				<div class="col-md-4">
						<div class="portlet green box">
							<div class="portlet-title">
								<div class="caption">
									<i class="fa fa-cogs"></i> 列表
								</div>
							</div>
							<div class="portlet-body" >
								<div id="dataTree" class="l-scroll"> </div>
							</div>
						</div>
				</div>
		</div></div>
					   <div class="modal-footer">
							<button type="button" class="btn default" data-dismiss="modal">取消</button>
							<button type="button" class="btn red" onclick="delConfValue()" id="btnDel">删除</button>
							<button type="button" class="btn blue" onclick="saveValue()" >保存</button>
						</div>
				</div>
				</div>
			</div>
					<div id="confvaluebaseInfo2" class="modal fade bs-modal-lg" tabindex="-1" role="dialog" data-keyboard="false">
									<div class="modal-dialog modal-lg">
										<div class="modal-content">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal"></button>
												<h4 class="modal-title">列表模式-内容编辑</h4>
											</div>
											<div class="modal-body">
											<div class="row">
					<div class="col-md-12">
						<form id="confvalueformBase" class="form-horizontal">
										<div class="form-group" id="word" >
											<label class="col-md-3 control-label">描述/(签收单位)ip开始</label>
											<div class="col-md-6">
												<textarea id="remark" name="remark" class="form-control" maxlength="225" rows="1"></textarea>
											</div>
										</div>
										<input type="hidden" id="id" name="id" >
										<input type="hidden" id="pid" name="pid" value="0">
										<input type="hidden" id="typeid" name="typeid"/>
										<input type="hidden" id="value2" name="value2"/>
										<input type="hidden" id="levels" name="levels" >
										<div class="form-group">
											<label class="col-md-3 control-label">文字</label>
											<div class="col-md-6">
												<input type="text" id="value0" name="value0" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">链接/(签收单位)ip结束</label>
											<div class="col-md-6">
												<input type="text" id="value1" name="value1" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">排序号</label>
											<div class="col-md-6">
												<input type="text" id="sort" name="sort" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">扩展1</label>
											<div class="col-md-6">
												<input type="text" id="value3" name="value3" class="form-control">
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-3 control-label">扩展2</label>
											<div class="col-md-6">
												<input type="text" id="value4" name="value4" class="form-control">
											</div>
										</div>
										<div class="form-group" id="pic">
											<label class="col-md-3 control-label">图片</label>
											<div class="col-md-8">
												<div class="fileinput fileinput-new" data-provides="fileinput">
													<div class="fileinput-new thumbnail" style="width: 300px; height: 100px;">
														<img  id="showImg" >
													</div>
													<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 200px; max-height: 100px;">
													</div>
													<div>
														<span class="btn default btn-file">
															<span class="fileinput-new">
																 上传图片
															</span>
															<span class="fileinput-exists">
																 修改
															</span>
															<input type="file" id="file2" accept="image/*" name="file" />
														</span>
														<a href="#" class="btn default fileinput-exists" data-dismiss="fileinput">
															 删除
														</a>
													</div>
												</div>
											</div>
										</div>
							</form>
				</div>
		</div></div>
					   <div class="modal-footer">
							<button type="button" class="btn default" data-dismiss="modal">取消</button>
							<button type="button" class="btn red" onclick="delConfValue()" id="btnDel">删除</button>
							<button type="button" class="btn blue" onclick="saveValue()"  >保存</button>
						</div>
				</div>
				</div>
			</div>
			
			<div id="confvaluebaseInfo3" class="modal fade bs-modal-lg" tabindex="-1" role="dialog" data-keyboard="false">
									<div class="modal-dialog modal-lg">
										<div class="modal-content">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal"></button>
												<h4 class="modal-title">文字模式-内容编辑</h4>
											</div>
											<div class="modal-body">
											<div class="row">
					<div class="col-md-12">
						<form id="confvalueformBase" class="form-horizontal">
										<div class="form-group" id="word" >
											<label class="col-md-3 control-label">描述</label>
											<div class="col-md-6">
												<textarea id="remark" name="remark" class="form-control" maxlength="225" rows="2"></textarea>
											</div>
										</div>
										<input type="hidden" id="id" name="id" >
										<input type="hidden" id="pid" name="pid" value="0">
										<input type="hidden" id="typeid" name="typeid"/>
										<input type="hidden" id="levels" name="levels" >
										<div class="form-group">
											<label class="col-md-3 control-label">文字</label>
											<div class="col-md-6">
												<input type="text" id="value0" name="value0" class="form-control">
											</div>
										</div>
							</form>
				</div>
		</div></div>
					   <div class="modal-footer">
							<button type="button" class="btn default" data-dismiss="modal">取消</button>
							<button type="button" class="btn red" onclick="delConfValue()" id="btnDel">删除</button>
							<button type="button" class="btn blue" onclick="saveValue()"  >保存</button>
						</div>
				</div>
				</div>
			</div>	
			
			<div id="confvaluebaseInfo4" class="modal fade bs-modal-lg" tabindex="-1" role="dialog" data-keyboard="false">
									<div class="modal-dialog modal-lg">
										<div class="modal-content">
											<div class="modal-header">
												<button type="button" class="close" data-dismiss="modal"></button>
												<h4 class="modal-title">图文模式-内容编辑</h4>
											</div>
											<div class="modal-body">
											<div class="row">
					<div class="col-md-12">
						<form id="confvalueformBase" class="form-horizontal">
										<div class="form-group" id="word" >
											<label class="col-md-1 control-label">描述</label>
											<div class="col-md-11">
												<textarea id="remark" name="remark" class="form-control" maxlength="225" rows="1"></textarea>
											</div>
										</div>
										<input type="hidden" id="id" name="id" >
										<input type="hidden" id="pid" name="pid" value="0">
										<input type="hidden" id="typeid" name="typeid"/>
										<input type="hidden" id="levels" name="levels" >
										<div class="form-group">
											<label class="col-md-1 control-label">内容</label>
											<div class="col-md-11">
												<input id="value0" type="hidden" name="value0">
                        <script id="editor" type="text/plain"  style="height:300px;"></script>
											</div>
										</div>
							</form>
				</div>
		</div></div>
					   <div class="modal-footer">
							<button type="button" class="btn default" data-dismiss="modal">取消</button>
							<button type="button" class="btn red" onclick="delConfValue()" id="btnDel">删除</button>
							<button type="button" class="btn blue" onclick="saveValue()"  >保存</button>
						</div>
				</div>
				</div>
			</div>					
					</div>
					</div>
		
			</div>
		</div>
	</div>
	<jsp:include page="../common/footer.jsp" />
	<script src="${path}/assets/plugins/bootstrap-modal/js/bootstrap-modalmanager.js" type="text/javascript"></script>
	<script src="${path}/assets/plugins/bootstrap-modal/js/bootstrap-modal.js" type="text/javascript"></script>
	<script type="text/javascript" src="${path}/assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js" ></script>
	<script type="text/javascript" src="${path}/assets/scripts/biz/ajaxfileupload.js" ></script>

	<script src="${path}/assets/plugins/ligerUI/js/core/base.js" type="text/javascript"></script>
	<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
	<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script> 
	<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerDrag.js"></script>
	<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerDialog.js"></script>
	<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerTree.js"></script>
	
	<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="${path}/assets/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>

	<script src="${path}/platform/js/conf.js"></script>
	<script type="text/javascript">
        $(".scroller").height($(window).height()-168);
	</script>

<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
